package com.jcl.recruit.console.corp.service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.jcl.core.common.page.PageResult;
import com.jcl.core.utils.CollectionUtils;
import com.jcl.core.utils.StringUtils;
import com.jcl.recruit.console.corp.logic.ConsoleCorpLogic;
import com.jcl.recruit.console.model.ConsoleCorpInfo;
import com.jcl.recruit.console.vo.ConsoleCorpPageCondition;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import static org.springframework.beans.support.PagedListHolder.DEFAULT_PAGE_SIZE;

/**
 * @ClassName ConsoleCorpService
 * @Author yyliu
 * @Date 2018/12/25 16:23
 * @Version 1.0
 **/
@Service
public class ConsoleCorpService {

    @Autowired
    private ConsoleCorpLogic consoleCorpLogic;

    public PageResult pageResult(ConsoleCorpPageCondition condition) {

        if(StringUtils.isEmpty(condition.getKeyword())){
            condition.setKeyword(null);
        }
        return consoleCorpLogic.pageResult(condition, condition.getCurPage(), condition.getRowSize());
    }

    public List<Map<String, Object>> selectList() {

        return consoleCorpLogic.selectList();
    }


}
